﻿<div ng-if="item.get_thumbnailUrl().length > 15" class="thumbwrap">
    <div ng-click="clickThumb(item)"
         ng-dblclick="clickThumb(item,true)"
        ng-context-menu="showMenu"
         ng-mouseenter="hoverThumb(item)"
        index="{{$index}}" 
        title="{{item.get_name()}}"
        ng-class="item.get_thumbnailUrl() + item.get_name() == activeItem ? 'thumbnail active' : 'thumbnail'">
        <div ng-if="!item.get_isFolder() && item.get_name() != 'Up Level'"
             id="menuContainer{{$index}}"
             class="{{dropdownClass}}">
            <div bs-popover="popover" class="thumb-popover" tabindex="0">&nbsp;</div>
            <a data-toggle="dropdown" role="button" class="drop-toggle">&nbsp;</a>
        </div>
        <i class="fa fa-image"
           ng-if="item.get_backgroundImageset() != null || item.get_studyImageset() != null"></i>
        <i class="fa fa-folder-open-o"
           ng-if="item.get_isFolder() && item.get_name() != 'Up Level' && (item.thumb && item.thumb.indexOf('wwtweb.blob.core.windows.net') == -1)"></i>
        <img class="thumbnail-image" ng-src="{{item.thumb || item.get_thumbnailUrl()}}" alt="Thumbnail of {{item.get_name()}}"
           onerror="this.src='//worldwidetelescope.org/wwtweb/thumbnail.aspx?name=star'"/>
        <label>{{item.get_name()}}</label>
    </div>
</div>
